package com.wl.application.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

import java.net.URI;
import java.util.List;
import java.util.Map;

/**
 * @author wl
 * @version 1.0
 * @date 2022/7/21
 * @description:
 */
@RestController
@RefreshScope //设置当前的类为动态刷新配置文件
public class ConsumerController {
    @Value("${myconfig.name}")
    public String name;

    @GetMapping("/get")
    public String getName(){
        return name;
    }
}
